<?php
/**
 * Created by PhpStorm.
 * User: Zwc
 * Date: 2025/11/13
 * Time: 11:09
 */

namespace App\Api;

use App\Domain\ConstellationDomain;
use PhalApi\Api;
use function PhalApi\T;

class Constellation extends Api
{
    public function getRules()
    {
        return [
            'getConstellationData' =>[
                'langId' => ['name' => 'langId', 'type' => 'int', 'desc' => '语言ID'],
            ]
        ];
    }

    /**
     * 获取星座内容
     * @return array
     */
    public function getConstellationData(): array
    {
        return $resData = [
            'code' => 0,
            'msg' => T("获取数据成功"),
            'info' => ConstellationDomain::getConstellationData($this->langId)
        ];
    }


}